<extend name="Public/base" />

<block name="body">
    <div class="main-title" style="padding-bottom: 10px;" >
        <h2>新建供货商</h2>
    </div>
    <div class="row" >
        <form action="{:U('editprovider')}" method='post' class="form-horizontal" ng-init='init({$product})'>
            <div class="form-item">
                <input type="hidden" name="id" value="{$info.id}">
                <label for="providername" class="item-label">供货商</label>
                <input type="text" name="providername" class="form-control text input-large" id="providername" value="{$info.name}" required/>
            </div>
            <div class="form-item">
                <label for="tel" class="item-label">手机</label>
                <input type="tel" name="tel" class="form-control text input-large" id="tel" value="{$info.tel}"/>
            </div>
            <div class="form-item">
                <label for="provideraccount" class="item-label">账号</label>
                <input type="text" name="provideraccount" class="form-control text input-large" id="provideraccount" value="{$info.account}" autocomplete="off" required/>
            </div>
            <div class="form-item">
                <label for="providerpwd" class="item-label">密码</label>
                <input type="password" name="providerpwd" class="form-control text input-large" id="providerpwd" value="{$info.password}" autocomplete="off" required/>
            </div>
            <div class="form-item " style="width: 100%;">
            <label class="item-label">经销水果</label>
            <table style="font-size: 15px;">
                <volist name="_prolist" id="pro1" >
                    <tr>
                        <volist name="pro1" id="pro">

                            <td>
                                <if condition="in_array($pro['id'],$permissionlist)">
                                    <input type="checkbox" name="permission[]" value="{$pro.id}" checked>
                                    <else/>
                                    <input type="checkbox" name="permission[]" value="{$pro.id}" >
                                </if>
                                &nbsp;&nbsp;{$pro.name}
                            </td>
                        </volist>
                    </tr>
                </volist>
            </table>

        </div>
            <div class="col-md-12 " >
                <button type="submit" class="btn confirm btn-danger" style="">保 存</button>
                <a  class="btn btn-success" id="fh" onclick="javascript:history.back(-1); return false;">返 回</a>
            </div>
        </form>
    </div>
</block>

<block name="script">
    <script type="text/javascript">
        highlight_subnav('{:U('Provider/providerlist')}');
    </script>
</block>
